using System.Collections.Generic;
using ImageProcessing.Common;
using ImageProcessing.Engine;

namespace ImageProcessing
{
    public class ImageScanResultsDTO
    {
        public List<InterestPoint> InterestPoints { get; private set; }
        private PointsResultProcessor _prp;

        public long CaptureMs { get; private set; }
        public long SelecterMs { get; private set; }
        public long DescriptorMs { get; private set; }
        public long MatcherMs { get; private set; }

        public int IptsCount { get; private set; }
        public int PIptsCount { get; private set; }
        public int MatchCount { get; private set; }

        public bool ObjectFound { get; private set; }
        public string BestFoundName { get; private set; }

        public ImageScanResultsDTO(long captureMs, long selectorMs, long descriptorMs, long matcherMs, int iptsCount, int pIptsCount, List<InterestPoint> interestPoints, PointsResultProcessor prp)
        {
            CaptureMs = captureMs;
            SelecterMs = selectorMs;
            DescriptorMs = descriptorMs;
            MatcherMs = matcherMs;

            InterestPoints = interestPoints;
            _prp = prp;

            IptsCount = iptsCount;
            PIptsCount = pIptsCount;

            if (_prp != null && _prp.BestFoundObject != null)
            {
                ObjectFound = true;
                BestFoundName = prp.BestFoundObject.TagInfo.TagName;
                MatchCount = prp.BestFoundObject.FoundPointsCount;
            }

        }
    }
}